<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Str;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});


Route::get('test', function (Request $request) {
    var_dump(env('ARTICLE_PAGE_SIZE') ?: env('PAGE_SIZE') ?: 12);
});

Route::get('uuid', function (Request $request) {
    // var_dump(Str::uuid());// object(Ramsey\Uuid\Rfc4122\UuidV4)#338 (4) { ...
    var_dump((string) Str::uuid());// string(36) "e80af0df-4044-448e-8eb2-64857e8c942a"
});

Route::get('article/list', 'Api\Spa\Admin\ArticleController@getList');
Route::get('article/one', 'Api\Spa\Admin\ArticleController@getOne');